package top.yaofengqiao.springcloudsimple.message.biz.domain.sms.model.valobj;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author yfq
 * @date 2024/6/22 10:50
 * @description
 */
@Getter
@AllArgsConstructor
public enum SmsPlatform {
    ALI_YUN("AliYun", "阿里云");

    // 平台code
    private final String code;
    // 描述
    private final String desc;

    public static SmsPlatform determineSmsPlatform(String code) {
        for (SmsPlatform value : SmsPlatform.values()) {
            if (value.getCode().equals(code)) return value;
        }

        return null;
    }
}
